<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" encoding="utf-8" indent="yes"/>

  <xsl:template match="message">
    <message type="listing" about="category" what="students">
      <xsl:for-each select="student[not(@id = following::student/@id)]">
        <xsl:sort order="ascending" data-type="number" select="@id"/> 
          <xsl:copy-of select="."/>
      </xsl:for-each>
    </message>
  </xsl:template>

</xsl:stylesheet>
